<?php

namespace Modules\Common\Models\Validation;


/**
 *@property int $id
 *@property int $sid
 *@property int $eid
 *@property int $user_id
 *@property int $ebook_id
 *@property string $order_sn
 *@property string $channel
 *@property string $order_date
 *@property string $start_date
 *@property string $end_date
 *@property string $payment_url
 *@property int $status
 *@property int $subscription_type_id
 *@property string $total_amount
 *@property int $payment_method
 *@property string $created_at
 *@property string $updated_at
 *@property string $deleted_at
 */
trait OrdersValidation 
{


    public function createRules()
    {
         return [
            'rules' => [
                'user_id'=>'integer',
                'ebook_id'=>'integer',
                'order_date'=>'between:0,32',
                'order_sn'=>'between:0,255',
                'channel'=>'between:0,32',
                'status'=>'integer',
                'total_amount'=>'between:0,32',
                'payment_method'=>'integer',
            ],
            'messages' => [
            ],
            'customAttributes' => [
            ]
        ];
    }

    public function updateRules()
    {
         return [
            'rules' => [
                'user_id'=>'integer',
                'ebook_id'=>'integer',
                'order_date'=>'between:0,32',
                'order_sn'=>'between:0,255',
                'channel'=>'between:0,32',
                'status'=>'integer',
                'total_amount'=>'between:0,32',
                'payment_method'=>'integer',
                'start_date'=>'between:0,32',
                'end_date'=>'between:0,32',
            ],
            'messages' => [
            ],
            'customAttributes' => [
            ]
        ];
    }


}
